package com.SinaMicroblogging.TabFocused;

import java.util.Dictionary;
import java.util.Hashtable;

public class TabAssember {
	private static Dictionary<TabEnum, ITabFocused> dictionary = new Hashtable<TabEnum, ITabFocused>();

	static {
		dictionary.put(TabEnum.Home, new HomeTabFocused());
		dictionary.put(TabEnum.Message, new MessageTabFocused());
		dictionary.put(TabEnum.Personal, new PersonalTabFocused());
		dictionary.put(TabEnum.Search, new SearchTabFocused());
	}

	public static ITabFocused getTabFocused(TabEnum type) {
		return (ITabFocused) dictionary.get(type);
	}

	public static ITabFocused getTabFocused(String type) {
		return (ITabFocused) dictionary.get(TabEnum.valueOf(type));
	}
}
